﻿Public Class PageSetting

    Private _字体 As String = ""
    Public Property 字体() As String
        Get
            Return _字体
        End Get
        Set(ByVal value As String)
            _字体 = value
        End Set
    End Property

    Private _记录条数 As String = ""
    Public Property 记录条数() As String
        Get
            Return _记录条数
        End Get
        Set(ByVal value As String)
            _记录条数 = value
        End Set
    End Property

    Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click

        If nu条数.Value < 10 Then
            ShowMessageBox("记录条数不能小于10条")
            nu条数.Focus()
            Exit Sub
        End If
        字体 = cbo字体.Text
        记录条数 = nu条数.Value
        DialogResult = Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        DialogResult = Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub PageSetting_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim ifc As System.Drawing.Text.InstalledFontCollection = New System.Drawing.Text.InstalledFontCollection()
        Me.cbo字体.DataSource = ifc.Families
        Me.cbo字体.DisplayMember = "Name"

        cbo字体.Text = 字体
        nu条数.Value = 记录条数

    End Sub
End Class
